-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Show grants for user statement #2650
Conversation
0ded24e
to
9420847
Compare
user := s.User("susy") | ||
|
||
// Grant normal user write privileges on database "bar". | ||
user.Privileges["bar"] = influxql.WritePrivilege |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should you check later on that this privilege actually comes back?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
haha probably 👍 Will fix it now ...
a74dd7e
to
95c0f09
Compare
+1. Can you also update CHANGELOG.md, and if you haven't already, please sign the CLA |
@@ -1068,6 +1070,26 @@ func (p *Parser) parseShowServersStatement() (*ShowServersStatement, error) { | |||
} | |||
|
|||
// parseShowDatabasesStatement parses a string and returns a ShowDatabasesStatement. | |||
// This function assumes the "SHOW GRANTS" tokens have already been consumed. | |||
func (p *Parser) parseGrantsForUserStatement() (*ShowGrantsForUserStatement, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to fix the comment for this method.
@n1tr0g thanks! Looks good overall. Just a couple small changes that need to be made. |
No worries. I will apply the suggested changes tonight. |
Changed applied. |
@n1tr0g we just merged some major changes for rc32 - could you rebase this? thanks! |
hehe that's really a MAJOR change. I will have a look. |
merged and code modified. Please review. |
Good work with the release of 0.9.0, but I am surprised that this change didn't get merged before that. Is there an alternative way to see users privileges on a database ? |
@n1tr0g I take the blame for not merging this on time. Sorry about that, I know we created unnecessary work for you, and that's not cool. Looks like it might need a rebase one more time likely due to a changelog conflict if I had to guess, but I also know we've already asked you to do more work than you should of. If you want, I can rebase it for you and merge it in. Thanks for all your work, and so sorry this didn't get merged. |
HeHe yeah this PR is taking ages, but no problem. Rebase done. |
+1 LGTM |
+1 here too -- I'll merge now since @dgnorton also approved. |
Show grants for user statement
Wohoo its merged! Thanks again @n1tr0g!!! |
haha now I can have a drink to celebrate that :) |
As described #2212 we need to add show grants for user statement, so we are able to see user privileges.